package com.le.tester.javaThink.fifth.chapter24_ConcurrentProgramming;

/**
 * createTime：2021/8/18 9:38
 * description：InterferingTask
 */
public class InterferingTask implements Runnable {

    final int id;

    private static int val = 0;

    public InterferingTask(int id) {
        this.id = id;
    }

    @Override
    public void run() {
        for (int i = 0; i < 100; i++)
            val++;
        System.out.println(id + " " + Thread.currentThread().getName() + " " + val);
    }
}
